/* YOLO 一键自动按键助手自定义样式 */

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.main-container {
    margin-top: 30px;
}

.card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0 !important;
    border: none;
    padding: 20px;
}

.card-header h5 {
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.display-4 {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

.lead {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1.2rem;
}

.video-container {
    position: relative;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.video-feed {
    width: 100%;
    height: 450px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.drop-zone {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 50px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(102, 126, 234, 0.05);
}

.drop-zone:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #764ba2;
    transform: scale(1.02);
}

.drop-zone.dragover {
    background: rgba(102, 126, 234, 0.15);
    border-color: #764ba2;
    transform: scale(1.05);
}

.status-indicator {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 10px;
    box-shadow: 0 0 10px currentColor;
}

.status-active {
    background-color: #28a745;
    animation: pulse 1.5s infinite;
}

.status-inactive {
    background-color: #dc3545;
}

@keyframes pulse {
    0% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.6;
        transform: scale(1.1);
    }
    100% { 
        opacity: 1;
        transform: scale(1);
    }
}

.log-container {
    max-height: 250px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
}

.log-item {
    padding: 12px;
    margin: 8px 0;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 5px solid #667eea;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.log-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.class-item {
    padding: 12px;
    margin: 8px 0;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.class-item:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.class-item.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.class-item.selected::after {
    content: '✓';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    font-weight: bold;
}

.btn-control {
    padding: 15px 35px;
    font-size: 18px;
    border-radius: 30px;
    transition: all 0.3s ease;
    border: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-start {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.btn-start:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.6);
}

.btn-stop {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

.btn-stop:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.6);
}

.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* 滚动条美化 */
.log-container::-webkit-scrollbar {
    width: 8px;
}

.log-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.log-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.log-container::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-container {
        margin-top: 15px;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .video-feed {
        height: 300px;
    }
    
    .btn-control {
        padding: 12px 25px;
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .drop-zone {
        padding: 30px;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* 加载动画 */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
